import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Layout from "../views/layout/Layout";
// import Login from '@/views/login/index'
Vue.use(Router)

export const constantRouterMap = [

    {
        path: '/',
        name: '首页',
        hidden: false,
        redirect: '/dashboard',
        component: Layout,
        children: [{
            name: '首页',
            path: 'dashboard',
            hidden: false,
            component: () => import('@/views/function/home'),
            meta: {
                icon: 'el-icon-s-home'
            }
        }
        ]
    },
    {
        path: '/knowledge/lifecycle',
        name: '基础知识',
        hidden: false,
        component: Layout,
        children: [
            {
                name: '动态绑定CSS',
                path: 'dynamicCss',
                hidden: false,
                component: () => import('@/views/knowledge/dynamicCss'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },
            {
                name: '组件通信',
                path: 'template',
                hidden: false,
                component: () => import('@/views/knowledge/template'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },
            {
                name: '生命周期',
                path: 'lifecycle',
                hidden: false,
                component: () => import('@/views/knowledge/lifecycle'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },
            {
                name: '常用指令',
                path: 'instructions',
                hidden: false,
                component: () => import('@/views/knowledge/instructions'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },
            {
                name: '事件处理',
                path: 'vOn',
                hidden: false,
                component: () => import('@/views/knowledge/vOn'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },

            {
                name: '表单绑定',
                path: 'vModel',
                hidden: false,
                component: () => import('@/views/knowledge/vModel'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },

            {
                name: '倾听器',
                path: 'watch',
                hidden: false,
                component: () => import('@/views/knowledge/watch'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },

            {
                name: '过滤器',
                path: 'filter',
                hidden: false,
                component: () => import('@/views/knowledge/filter'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },




        ]
    },


    {
        path: '/elementUI/layoutAndContainer',
        name: 'elementUI Basic',
        hidden: false,
        component: Layout,
        children: [
            {
                name: '布局和布局容器',
                path: 'layoutAndContainer',
                hidden: false,
                component: () => import('@/views/element/basic/layoutAndConttainer'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },
            {
                name: '按钮',
                path: 'button',
                hidden: false,
                component: () => import('@/views/element/basic/buttonAndLink'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },
        ]
    },




    {
        path: '/elementUI/radio',
        name: 'elementUI Form',
        hidden: false,
        component: Layout,
        children: [
            {
                name: 'form表单',
                path: 'form',
                hidden: false,
                component: () => import('@/views/element/form/form'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },
            {
                name: '单选和多选',
                path: 'radio',
                hidden: false,
                component: () => import('@/views/element/form/radioAndCheckbox'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },
            {
                name: '输入框',
                path: 'button',
                hidden: false,
                component: () => import('@/views/element/form/input'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },
            {
                name: '选择器',
                path: 'select',
                hidden: false,
                component: () => import('@/views/element/form/select'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },

            {
                name: '时间选择器',
                path: 'timeSelect',
                hidden: false,
                component: () => import('@/views/element/form/timePickerAndDatePicker'),
                meta: {
                    icon: 'el-icon-collection'
                }
            }

        ]
    },



    {
        path: '/elementUI/data',
        name: 'elementUI Data',
        hidden: false,
        component: Layout,
        children: [
            {
                name: '表格',
                path: 'table',
                hidden: false,
                component: () => import('@/views/element/data/table'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },
            {
                name: '分页',
                path: 'page',
                hidden: false,
                component: () => import('@/views/element/data/page'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },

            {
                name: '消息提醒',
                path: 'message',
                hidden: false,
                component: () => import('@/views/element/notice/message'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },

            {
                name: '对话框',
                path: 'dialog',
                hidden: false,
                component: () => import('@/views/element/notice/dialog'),
                meta: {
                    icon: 'el-icon-collection'
                }
            }


        ]
    },

    {
        path: '/interface/task',
        name: '任务管理',
        hidden: false,
        component: Layout,
        children: [

            {
                name: '接口管理',
                path: 'api',
                hidden: false,
                component: () => import('@/views/interface/api/apiManager'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },

            {
                name: '任务管理',
                path: 'task',
                hidden: false,
                component: () => import('@/views/interface/task/taskManager'),
                meta: {
                    icon: 'el-icon-collection'
                }
            },




        ]
    },


















    // {
    //     path: '/elementUI/layoutAndContainer',
    //     name: 'elementUI Basic',
    //     hidden: false,
    //     component: Layout,
    //     children: [
    //         {
    //             name: '1、布局和布局容器',
    //             path: 'layoutAndContainer',
    //             hidden: false,
    //             component: () => import('@/views/elementUI/basic/layoutAndContainer'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },
    //         {
    //             name: '2、按钮和文字链接',
    //             path: 'buttonAndLink',
    //             hidden: false,
    //             component: () => import('@/views/elementUI/basic/buttonAndLink'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },

    //     ]
    // },


    // {
    //     path: '/elementUI/layoutAndContainer',
    //     name: 'elementUI Form',
    //     hidden: false,
    //     component: Layout,
    //     children: [
    //         {
    //             name: '1、单选框和多选框',
    //             path: 'radioAndCheckbox',
    //             hidden: false,
    //             component: () => import('@/views/elementUI/radioAndCheckbox'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },
    //         {
    //             name: '2、输入框',
    //             path: 'input',
    //             hidden: false,
    //             component: () => import('@/views/elementUI/form/input'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },


    //         {
    //             name: '3、选择器',
    //             path: 'select',
    //             hidden: false,
    //             component: () => import('@/views/elementUI/form/select'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },


    //         {
    //             name: '4、级联选择器',
    //             path: 'cascader',
    //             hidden: false,
    //             component: () => import('@/views/elementUI/form/cascader'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },

    //         {
    //             name: '5、时间和日期选择器',
    //             path: 'timePickerAndDateTimePicker',
    //             hidden: false,
    //             component: () => import('@/views/elementUI/form/timePickerAndDateTimePicker'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },

    //         {
    //             name: '6、form表单',
    //             path: 'form',
    //             hidden: false,
    //             component: () => import('@/views/elementUI/form/form'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },
    //     ]
    // },

    // {
    //     path: '/elementUI/table',
    //     name: 'elementUI data',
    //     hidden: false,
    //     component: Layout,
    //     children: [
    //         {
    //             name: '1、表格',
    //             path: 'table',
    //             hidden: false,
    //             component: () => import('@/views/elementUI/data/table'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },
    //         {
    //             name: '2、标签和进度条',
    //             path: 'tagAndProgress',
    //             hidden: false,
    //             component: () => import('@/views/elementUI/data/tagAndProgress'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },
    //         {
    //             name: '3、分页',
    //             path: 'pagination',
    //             hidden: false,
    //             component: () => import('@/views/elementUI/data/pagination'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },

    //     ]
    // },








    // {
    //     path: '/knowledge/instructions',
    //     name: '基础知识',
    //     hidden: false,
    //     component: Layout,
    //     children: [

    //         {
    //             name: '自定义指令',
    //             path: 'instructions',
    //             hidden: false,
    //             component: () => import('@/views/baseFunction/instructions'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },
    //         {
    //             name: '插槽使用',
    //             path: 'slot',
    //             hidden: false,
    //             component: () => import('@/views/baseFunction/slots'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },
    //         {
    //             name: '常用JS处理',
    //             path: 'js',
    //             hidden: false,
    //             component: () => import('@/views/baseFunction/generaljs'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },

    //         {
    //             name: '组件通信',
    //             path: 'template',
    //             hidden: false,
    //             component: () => import('@/views/baseFunction/template'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },
    //         {
    //             name: '双向绑定',
    //             path: 'model',
    //             hidden: false,
    //             component: () => import('@/views/baseFunction/bindOrOnOrmodel'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },
    //         {
    //             name: '常用命令',
    //             path: 'directives',
    //             hidden: false,
    //             component: () => import('@/views/baseFunction/directives'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },
    //         {
    //             name: '计算属性',
    //             path: 'calculationProperties',
    //             hidden: false,
    //             component: () => import('@/views/baseFunction/calculationProperties'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },
    //         {
    //             name: '动态样式',
    //             path: 'dynamicCSS',
    //             hidden: false,
    //             component: () => import('@/views/baseFunction/dynamicCSS'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },
    //         {
    //             name: '监听器',
    //             path: 'watch',
    //             hidden: false,
    //             component: () => import('@/views/baseFunction/watch'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },
    //         {
    //             name: '过滤器',
    //             path: 'filter',
    //             hidden: false,
    //             component: () => import('@/views/baseFunction/filters'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         },
    //         {
    //             name: '生命周期',
    //             path: 'lifeCycle',
    //             hidden: false,
    //             component: () => import('@/views/baseFunction/lifeCycle'),
    //             meta: {
    //                 icon: 'el-icon-collection'
    //             }
    //         }
    //     ]
    // },
]

export default new Router({
    mode: 'history',
    routes: constantRouterMap
})
